package br.com.PalmDroid;

import br.com.PalmDroid.R;
import br.com.PalmDroid.R.id;
import br.com.model.Pesquisar;
import br.com.view.TelaLogin;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

public class PalmDroid extends Activity {

	/** Called when the activity is first created. */
    
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);              
    }
	

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
     	
     	MenuInflater menuInflater = getMenuInflater();
     	menuInflater.inflate(R.menu.menu1, menu);
     	return true;
     }
	
	@Override
	public boolean onOptionsItemSelected (MenuItem item){
		
		switch(item.getItemId()){
		
		case id.sair:
			finish();
			break;
			
		case id.login:
			Intent i = new Intent(PalmDroid.this, TelaLogin.class);
	        startActivity(i);
		}
		
		return true;
	}
	
}